luci-mod-network: only consider bridge vlans belonging to the current device
authorJo-Philipp Wich <[email protected]>
Thu, 17 Jun 2021 06:58:15 +0000 (08:58 +0200)
committerJo-Philipp Wich <[email protected]>
Thu, 17 Jun 2021 07:39:38 +0000 (09:39 +0200)
In case multiple bridges with bridge vlans are declared, LuCI did not
correctly filter the VLANs to show only the ones belonging to the
bridge being configured currently.

Signed-off-by: Jo-Philipp Wich <[email protected]>
(cherry picked from commit f6f1eacb012b0364940c1dc9b9392fc0e60405b9)

modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js

index 2ebf3afe029a4328e4a8a883a75db5b7eda42087..ce6388b6cd79f5026a57e473490036ed8e11bae7 100644 (file)
@@ -968,6 +968,9 @@ return baseclass.extend({
                });
 
                uci.sections('network', 'bridge-vlan', function(bvs) {
+                       if (uci.get('network', s.section, 'name') != bvs.device)
+                               return;
+
                        L.toArray(bvs.ports).forEach(function(portspec) {
                                var m = portspec.match(/^([^:]+)(?::[ut*]+)?$/);